package com.syedu.day08.homework;

/**
 * @Description
 * @createTime 2022/3/17 16:41
 * @author Administrator
 */
public class TestShape {
    public static void main(String[] args) {
        //创建业务类对象
        ShapeService service = new ShapeService();

        //使用工厂类来创建对象
        Shape shape = ShapeFactory.getShape(ShapeFactory.CIRCLE);

        //Shape shape = getShape(CIRCIE);

        //设置属性
        ((Circle) shape).setRadius(3.0);

        //提供服务
        System.out.println(service.length(shape));
    }
}
